<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-cn">
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?3e333071a3344d3aca4055e478d3d968";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<html class="bootstrap-admin-vertical-centered">
    <head>
        <%
            String rootPath = request.getContextPath();
            request.setAttribute("rootPath", rootPath);
        %>
        <title>征程</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <link rel="stylesheet" href="${rootPath}/static/bootstrap/3.3.7/css/bootstrap.css">
        <link rel="stylesheet" href="${rootPath}/static/my/css/style.css">

        <link href="${rootPath}/static/bootstrap/3.3.7/css/bootstrap-theme.css" rel="stylesheet" media="screen">
        <link href="${rootPath}/static/bootstrap/3.3.7/css/bootstrap-admin-theme.css" rel="stylesheet" media="screen">

    </head>
    <body class="bootstrap-admin-without-padding">
        <div class="container">
            <div class="row">
                <form method="post" action="${rootPath}/login" class="bootstrap-admin-login-form">
                    <h1>登录</h1>
                    <div class="form-group">
                        <input class="form-control" type="text" name="username" placeholder="用户名">
                    </div>
                    <div class="form-group">
                        <input class="form-control" type="password" name="password" placeholder="密码">
                    </div>
                    <div class="form-group">
                        ${msg}
                    </div>
                    <div class="form-group">
                        <label>
                            <input type="checkbox" name="remember_me">
                           记住密码
                        </label>
                    </div>
                    <button class="btn btn-lg btn-primary" type="submit">提交</button>
                </form>
            </div>
        </div>

        <script src="${rootPath}/static/jquery/jquery-3.2.1.min.js"></script>
        <script src="${rootPath}/static/bootstrap/3.3.7/js/bootstrap.js"></script>
        <script type="text/javascript">
            $(function() {
                // Setting focus
                $('input[name="email"]').focus();

                // Setting width of the alert box
                var formWidth = $('.bootstrap-admin-login-form').innerWidth();
                var alertPadding = parseInt($('.alert').css('padding'));
                $('.alert').width(formWidth - 2 * alertPadding);
            });
        </script>
    </body>
</html>
